home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / nsclilib / ni_error.h < prev    next >
Text File  |  1996-07-05  |  8KB  |  178 lines

  1. /*      
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE                          
  5. *               National Center for Biotechnology Information
  6. *                                                                          
  7. *  This software/database is a "United States Government Work" under the   
  8. *  terms of the United States Copyright Act.  It was written as part of    
  9. *  the author's official duties as a United States Government employee and 
  10. *  thus cannot be copyrighted.  This software/database is freely available 
  11. *  to the public for use. The National Library of Medicine and the U.S.    
  12. *  Government have not placed any restriction on its use or reproduction.  
  13. *                                                                          
  14. *  Although all reasonable efforts have been taken to ensure the accuracy  
  15. *  and reliability of the software and data, the NLM and the U.S.          
  16. *  Government do not and cannot warrant the performance or results that    
  17. *  may be obtained by using this software or data. The NLM and the U.S.    
  18. *  Government disclaim all warranties, express or implied, including       
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.                                                                
  21. *                                                                          
  22. *  Please cite the author in any work or product based on this material.   
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:    ni_error.h
  27. *
  28. * Author:       Beatty, Gish
  29. *
  30. * Version Creation Date:        1/1/92
  31. *
  32. * $Revision: 4.0 $
  33. *
  34. * File Description: 
  35. *
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. * 5/12/92  Epstein     Converted tabs to spaces
  42. *
  43. *
  44. * ==========================================================================
  45. *
  46. *
  47. * RCS Modification History:
  48. * $Log: ni_error.h,v $
  49.  * Revision 4.0  1995/07/26  13:56:32  ostell
  50.  * force revision to 4.0
  51.  *
  52.  * Revision 1.12  1995/05/17  17:52:13  epstein
  53.  * add RCS log revision history
  54.  *
  55. */
  56.  
  57. #ifndef _NI_ERROR_
  58. #define _NI_ERROR_
  59.  
  60. #include "ncbinet.h"
  61.  
  62. #define NI_PLATFORM_UNKNOWN             0
  63. #define NI_PLATFORM_MAC                 1
  64. #define NI_PLATFORM_VMS_TGV             2
  65. #define NI_PLATFORM_AXP_OPENVMS         3
  66. #define NI_PLATFORM_GENERIC_UNIX        4
  67. #define NI_PLATFORM_IBM370AIX           5
  68. #define NI_PLATFORM_SUN                 6
  69. #define NI_PLATFORM_ALPHA_OSF1          7
  70. #define NI_PLATFORM_AUX                 8
  71. #define NI_PLATFORM_CRAY                9
  72. #define NI_PLATFORM_CONVEX              10
  73. #define NI_PLATFORM_HPUX                11
  74. #define NI_PLATFORM_NEXT                12
  75. #define NI_PLATFORM_SGI                 13
  76. #define NI_PLATFORM_ULTRIX              14
  77. #define NI_PLATFORM_DOS                 15
  78. #define NI_PLATFORM_WIN16               16
  79. #define NI_PLATFORM_WIN_NEWT            17
  80. #define NI_PLATFORM_WIN_PCNFS           18
  81. #define NI_PLATFORM_WIN_WINSOCK         19
  82. #define NI_PLATFORM_WINNT               20
  83. #define NI_PLATFORM_SYSV_ON_SPARC       21
  84. #define NI_PLATFORM_VMS_UCX             22
  85. #define NI_PLATFORM_VMS_TWG             23
  86. #define NI_PLATFORM_VMS_WPW             24
  87. #define NI_PLATFORM_AIX                 25
  88. #define NI_PLATFORM_LINUX               26
  89.  
  90. #define NI_MAX_PLATFORMS                26
  91.  
  92. #define NI_ErrLevel enum ni_errlevel
  93. NI_ErrLevel {
  94.     NIL_INFORMATION = 1,        /* informational */
  95.     NIL_WARNING,                /* small problem */
  96.     NIL_SEVERE,         /* recoverable */
  97.     NIL_FATAL           /* not recoverable */
  98. };
  99.  
  100. #define NI_Error enum ni_error
  101. NI_Error {
  102.     NIE_NO_ERROR = 0,   /* no error */
  103.     NIE_MISC,           /* error */
  104.     NIE_NOUSERENT,      /* no entry for user */
  105.     NIE_NOHOSTENT,      /* no entry for host */
  106.     NIE_NOSERVENT,      /* no entry for service */
  107.     NIE_BADHOST,        /* host address invalid */
  108.     NIE_BADPORT,        /* port number invalid */
  109.     NIE_SOCKOPEN,       /* can't open socket */
  110.     NIE_NOBIND,         /* can't bind socket */
  111.     NIE_NOACCEPT,       /* accept socket failed */
  112.     NIE_NOLISTEN,       /* listen on socket failed */
  113.     NIE_DISPCONN,       /* can't connect to dispatcher */
  114.     NIE_CLICONN,        /* can't connect to client */
  115.     NIE_APPCONN,        /* can't connect to application */
  116.     NIE_MAXCONNS,       /* maximum number of connections in use */
  117.     NIE_SELECT,         /* select statement failed */
  118.     NIE_MSGWRITE,       /* message write failed */
  119.     NIE_MSGREAD,        /* message read failed */
  120.     NIE_MSGUNK,         /* message type unknown */
  121.     NIE_FORK,           /* fork failed */
  122.     NIE_SETUID,         /* unable to set user ID */
  123.     NIE_EXEC,           /* execute failed */
  124.     NIE_SERVUNK,        /* unknown service */
  125.     NIE_FILOPEN,        /* can't open file */
  126.     NIE_CONFIG,         /* error in configuration file */
  127.     NIE_SVCENT,         /* error parsing service entry */
  128.     NIE_RESENT,         /* error parsing resource entry */
  129.     NIE_SVCUNAVL,       /* service is unavailable */
  130.     NIE_RESUNAVL,       /* resource is unavailable */
  131.     NIE_DSPDCONN,       /* dispatcher disconnected */
  132.     NIE_SVCDCONN,       /* service disconnected */
  133.     NIE_BADLOGIN,       /* login failed */
  134.     NIE_LOGTIMEOUT,     /* login timed out */
  135.     NIE_DSPTIMEOUT,     /* dispatcher timed out */
  136.     NIE_SVCTIMEOUT,     /* service timed out */
  137.     NIE_CMDTIMEOUT,     /* command timed out */
  138.     NIE_TIMEOUT,        /* timed out */
  139.     NIE_MAKEHAND,       /* unable to make message handle */
  140.     NIE_NOTINGRP,       /* user not in group required for access */
  141.     NIE_BADVERS,        /* version requested not in valid range */
  142.     NIE_BADNAME,        /* name requested was not found */
  143.     NIE_BADREQID,       /* requested ID was not found */
  144.     NIE_BADSELFD,       /* select returned unrequested fd */
  145.     NIE_NISERROR,       /* error using NIS service */
  146.     NIE_INVAL,          /* invalid argument */
  147.     NIE_BADEXIT,        /* child process exited abnormally */
  148.     NIE_SEMBUSY,        /* already running on this machine */
  149.     NIE_PIPE,           /* attempt to set up pipe failed */
  150.     NIE_PIPEIO,         /* i/o error on pipe */
  151.     NIE_SERVACK,        /* spawned server OK */
  152.     NIE_SERVNACK,       /* spawned server failed */
  153.     NIE_PARSE,          /* unable to parse string */
  154.     NIE_TYPEMISM,       /* service/resource type mismatch */
  155.     NIE_BACKUPDISP,     /* dispatcher is acting as backup */
  156.     NIE_NOTGUEST,       /* client is not an authorized guest user */
  157.     NIE_TCPINITFAIL,    /* TCP stack initialization failure */
  158.     NIE_NOLOCALHOSTENT, /* no entry for local host */
  159.     NIE_ASN1SPECFAIL,   /* ASN.1 specification load failure */
  160.     NIE_SVCNOTENCR,     /* service does not support encryption */
  161.     NIE_BROKSVCCONN,    /* can't connect to brokered service */
  162.     NIE_PUBKEYENCRFAIL, /* failure trying to perform public-key encryption */
  163.     NIE_PUBKEYDECRFAIL, /* failure trying to perform public-key decryption */
  164.     NIE_NEWKEYNOTACCPT, /* new encryption key was not accepted by user */
  165.     NIE_NEWKEYMISMATCH, /* mismatched new encryption key not accepted by user */
  166.     NIE_UNKNOWN         /* unknown error */
  167. };
  168.  
  169. extern Uint2            ni_nerr;                /* number of errors */
  170. extern enum ni_errlevel ni_errlev;              /* error level - NOT SET on error */
  171. extern enum ni_error    ni_errno;               /* error number set by failing function */
  172. extern Char * NEAR      ni_errlist[];           /* list of error messages */
  173. extern Char NEAR        ni_errtext[];           /* additional error text buffer */
  174. extern Char * NEAR      ni_platform[];          /* list of platform names messages */
  175.  
  176. #endif
  177.  
  178.